package top.software.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author: Amosen
 * @time: 2021-4-24
 */
@Configuration
public class WebMVCConfig implements WebMvcConfigurer {

	public String fileLocation = "classpath:/WEB-INF/files";

	public String filePath = "/uploadFile/**";

	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
		// TODO Auto-generated method stub
		registry.addResourceHandler(filePath).addResourceLocations(fileLocation);
	}
}
